<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<?php
	//Recebe os dados do GET
	$id_galeria = $_GET['id'];
?>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.js"></script> 
<script type="text/javascript" src="http://malsup.github.com/jquery.form.js"></script>
<script type="text/javascript">

$('#form').ajaxForm({
    	uploadProgress: function(event, position, total, percentComplete) {
        	$('progress').attr('value',percentComplete);
        	$('#porcentagem').html(percentComplete+'%');
    	},
    	success: function(data) {
        	$('progress').attr('value','100');
		$('#porcentagem').html('100%');
        	$('pre').html(data);
			document.location.href ="verifica.php?id=2";

        }	
    	
});
</script>
</head>

<body>
<form action="upload.php" method="post" id="form" enctype="multipart/form-data">
<input type="hidden" name="id_galeria" <?php echo "value='".$id_galeria."'"; ?>
 
 	<div id="file">
		<input name="arquivos[]" type="file" accept="image/jpeg, text/plain" multiple>
		<br ><br >
		<progress value="0" max="100"></progress><span id="porcentagem">0%</span>

 	</div>
 	<br />
 <input type="submit">
</form> 

<!--<form action="upload.php" method="post" enctype="multipart/form-data">
    <input type="file" name="arquivos[]" multiple accept="image/jpeg, text/plain">
    <input type="submit" value="Enviar">
</form>
--></body>
</html>
